package com.liy.framework.common.redis.utils;

public class RedisCacheKeyUtils {

    public static final String PREFIX_TOKEN = "TK_";
    public static final String PREFIX_USER_MENU = "UM_";
    public static final String PREFIX_USER_PERMISSION = "UP_";
    public static final String PREFIX_USER_PERMISSION_WEB = "UP2_";
    public static final String SHARE_PERMISSION = "SYS_SHARE_PERMISSION";
    public static final String SHARE_PERMISSION_WEB = "SYS_SHARE_PERMISSION_WEB";
    public static final String PREFIX_USER_ROLE = "UR_";


    public static String tokenKey(String token) {
        return "TK_" + token;
    }

    public static String userMenuKey(String userId) {
        return "UM_" + userId;
    }

    public static String userRoleKey(String userId) {
        return "UR_" + userId;
    }

    public static String userPermissionKey(String userId) {
        return "UP_" + userId;
    }

    public static String userPermissionWebKey(String userId) {
        return "UP2_" + userId;
    }
}
